var id = sessionStorage.getItem("productId");

axios.get(`http://localhost:9000/goods/item/${id}`).then(res => {
  if (res.data.code === 1) {
    const itemInfo = res.data.info;
    document.querySelector(".middleimg").src = itemInfo.img_big_logo;
    document.querySelector(".title").textContent = itemInfo.title;
    document.querySelector(".old").textContent = itemInfo.price;
    document.querySelector(".discount").textContent = itemInfo.sale_type;
    document.querySelector(".curprice").textContent = itemInfo.current_price;
    document.querySelector(".desc").innerHTML = itemInfo.goods_introduce;
  } else if (res.data.code === 0) {
    alert(res.data.msg);
  }
});
